﻿using iService.BASE;
using swiftCode.Bbs.Model.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace iService
{
    public interface IPostService : IBaseServices<Post>
    {
        Task<Post> FindSingleById(Expression<Func<Post, bool>> expression);

        Task<Post> PostArticle(Post post, bool autoSave = false);

        Task DeleteArticleById(Expression<Func<Post, bool>> expression, bool autoSave = false);

        Task<Post> UpdateArticle(Post post, bool autoSave = false);

        Task<List<Post>> SelectArticle(Expression<Func<Post, bool>> expression);

        Task<List<Post>> GetAllArticles();
    }
}
